/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */
package info.peigen.hotpot.component.doc.core.domain;

import info.peigen.hotpot.common.core.enums.CommentType;
import info.peigen.hotpot.common.core.enums.YesOrNo;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;

/**
 * <b>(HotpotDocAttribute)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2023/12/8
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@Accessors(chain = true)
public class HotpotDocAttribute {
    /** 属性名 */
    @NotEmpty
    String      name;
    /** 类型 */
    @NotNull
    CommentType type;
    /** 长度 */
    String size;
    /** 是否必填 */
    @Builder.Default
    YesOrNo requiredFields = YesOrNo.N;
    /** 默认值 */
    String   defaultValue;
    /** 属性描述，可能是个类，比如:Result对象中的INFO对象 */
    Object   description;
    Class<?> descriptionClass;
}
